﻿@model CSF.WebApp.Accounts.Models.RegisterModel
@{
    ViewBag.Title = "Register";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
    Register</h2>
<p>
    To provide prices we need to know where you are. Please provide your email, location
    and country.
</p>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")
    <fieldset>
        <legend>Create a New Account</legend>
        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>
        <div class="editor-field">
            <div style="float: left">
                @Html.CheckBoxFor(m => m.InMailList)</div>
            <div>
                Tick here if you want to be on our emailing list. We will never disclose this information
                to a third party.
            </div>
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Password)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Password)
            @Html.ValidationMessageFor(model => model.Password)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ConfirmPassword)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ConfirmPassword)
            @Html.ValidationMessageFor(model => model.ConfirmPassword)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.FirstName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.LastName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
            @Html.ValidationMessageFor(model => model.LastName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.CountryCode)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.CountryCode, ViewBag.CountryList as IEnumerable<SelectListItem>, "-- Please Select Country --")
            @Html.ValidationMessageFor(model => model.CountryCode)
        </div>
        <p>
            <input type="submit" value="Register" />
        </p>
    </fieldset>
}
